<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="utf-8">
    <title>
        小程序商城管理平台
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../css/x-admin.css" media="all">
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header header header-demo">
        <div class="layui-main">
            <a class="logo" href="index.html">
                一站式商城管理平台
            </a>
            <ul class="layui-nav" lay-filter="">
                <li class="layui-nav-item"><img src="../images/logo.png" class="layui-circle" style="border: 2px solid #A9B7B7;" width="35px" alt=""></li>
                <li class="layui-nav-item">
                    <a href="javascript:;">admin</a>
                    <dl class="layui-nav-child"> <!-- 二级菜单 -->
                        <dd><a href="">个人中心</a></dd>
                        <dd><a href="../logout">退出</a></dd>
                    </dl>
                </li>
                <!-- <li class="layui-nav-item">
                  <a href="" title="消息">
                      <i class="layui-icon" style="top: 1px;">&#xe63a;</i>
                  </a>
                  </li> -->
                <li class="layui-nav-item x-index"><a th:href="@{'../index'}">首页</a></li>
            </ul>
        </div>
    </div>
    <div class="layui-side layui-bg-black x-side">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree site-demo-nav" lay-filter="side">
                <li class="layui-nav-item">
                    <a class="javascript:;" href="javascript:;">
                        <i class="layui-icon" style="top: 3px;">&#xe607;</i><cite>会员管理</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../user/toUserList'}">
                                <cite>用户列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../user/toAdminList'}">
                                <cite>管理员管理</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../user/toRoleList'}">
                                <cite>角色管理</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../user/toNoteList'}">
                                <cite>短信管理</cite>
                            </a>
                        </dd>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="javascript:;" href="javascript:;">
                        <i class="layui-icon" style="top: 3px;">&#xe62d;</i><cite>商品管理</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../commodity/toCommodityList'}">
                                <cite>商品列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../commodity/toClassifyList'}">
                                <cite>商品分类</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../commodity/toTradeTrademarkList'}">
                                <cite>品牌列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../commodity/toMoldList'}">
                                <cite>商品类型</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../commodity/toParameterList'}">
                                <cite>商品属性</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../commodity/toPropertyList'}">
                                <cite>参数列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../commodity/toEvaluateList'}">
                                <cite>商品评价</cite>
                            </a>
                        </dd>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="javascript:;" href="javascript:;">
                        <i class="layui-icon" style="top: 3px;">&#xe634;</i><cite>订单管理</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../order/orderlist'}">
                                <cite>订单列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../invoice/invoicelist'}">
                                <cite>发货单列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../billoflading/BillListAll'}">
                                <cite>提货单列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../aftersale/aftersalelist'}">
                                <cite>售后单列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../return/returnlist'}">
                                <cite>退货单列表</cite>
                            </a>
                        </dd>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="javascript:;" href="javascript:;">
                        <i class="layui-icon" style="top: 3px;">&#xe642;</i><cite>运营管理</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../Article/Articlelist'}">
                                <cite>文章列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../notice/noticelist'}">
                                <cite>公告列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../ArticleType/ArticleTypelist'}">
                                <cite>文章分类</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../Advertising/Advertisinglist'}">
                                <cite>广告列表</cite>
                            </a>
                        </dd>
                        </dd>
                        <dd class="">
                        <dd class="">
                            <a th:href="@{'../Advertisingspace/Advertisingspacelist'}">
                                <cite>广告位列表</cite>
                            </a>
                        </dd>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="javascript:;" href="javascript:;">
                        <i class="layui-icon" style="top: 3px;">&#xe630;</i><cite>促销管理</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd class="">
                            <a th:href="@{'../promotion/seckillList'}">
                                <cite>团购秒杀列表</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../coupon/couponList'}">
                                <cite>优惠券列表</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../sales/salesList'}">
                                <cite>促销列表</cite>
                            </a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="javascript:;" href="javascript:;">
                        <i class="layui-icon" style="top: 3px;">&#xe606;</i><cite>财务管理</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd class="">
                            <a th:href="@{'../paylist'}">
                                <cite>支付单列表</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../withdlist'}">
                                <cite>提现列表</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../metlist'}">
                                <cite>支付方式列表</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../retlist'}">
                                <cite>退款单列表</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../acclist'}">
                                <cite>账户资金管理</cite>
                            </a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="javascript:;" href="javascript:;">
                        <i class="layui-icon" style="top: 3px;">&#xe612;</i><cite>控制面板</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd class="">
                            <a th:href="@{'../explist'}">
                                <cite>导入导出</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../piclist'}">
                                <cite>图片列表</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../stolist'}">
                                <cite>门店列表</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../log/loglist'}">
                                <cite>操作日志</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../logisticsCompany/getLogistics'}">
                                <cite>物流公司列表</cite>
                            </a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="javascript:;" href="javascript:;">
                        <i class="layui-icon" style="top: 3px;">&#xe613;</i><cite>微信管理</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd class="">
                            <a th:href="@{'../official/getOfficial'}">
                                <cite>公众号配置</cite>
                            </a>
                        </dd>
                        <dd class="">
                            <a th:href="@{'../official/getApplet'}">
                                <cite>小程序配置</cite>
                            </a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>

    </div>
    <div class="layui-tab layui-tab-card site-demo-title x-main" lay-filter="x-tab" lay-allowclose="true">
        <div class="x-slide_left"></div>

        <div style="padding:20px;overflow-y:auto; overflow-x:auto; width:1109px; height:500px"  >
            <span class="layui-breadcrumb" style="visibility: visible;">
                <i class="iconfont icon-shouyeshouye"></i>
                                        <a href="/manage/index/index.html">管理后台</a><span lay-separator="">/</span>
                                            <a href="/manage/wechat/index.html">微信管理</a><span lay-separator="">/</span>
                                            <a><cite>小程序配置</cite></a>
                                </span>
            <form class="layui-form seller-alone-form" method="post"  action="/official/updateApplet" style="">
                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2">request合法域名：</label>
                    <div class="layui-form-mid" name="domain">[[${applet.domain}]]</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2">socket合法域名：</label>
                    <div class="layui-form-mid ">[[${applet.domain}]]</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2">uploadFile合法域名：</label>
                    <div class="layui-form-mid ">[[${applet.domain}]]</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2">downloadFile合法域名：</label>
                    <div class="layui-form-mid ">[[${applet.domain}]]</div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2"><i class="required-color">*</i>小程序名称：</label>
                    <div class="layui-input-inline seller-inline-5">
                        <input type="text" required lay-verify="required" name="appletName" th:value="${applet.appletName}" class="layui-input" placeholder="请输入小程序名称">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2"><i class="required-color">*</i>AppId：</label>
                    <div class="layui-input-inline seller-inline-5">
                        <input type="text" name="appId" required lay-verify="required" th:value="${applet.appId}" autocomplete="off" placeholder="请输入小程序AppId" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">
                        请至微信小程序平台 设置》开发设置 中复制粘贴过来
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2"><i class="required-color">*</i>AppSecret：</label>
                    <div class="layui-input-inline seller-inline-5">
                        <input type="text" name="appSecret" required lay-verify="required" th:value="${applet.appSecret}" autocomplete="off" placeholder="请输入小程序AppSecret" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">
                        请至微信小程序平台 设置》开发设置 中复制粘贴过来
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2"><i class="required-color">*</i>原始Id：</label>
                    <div class="layui-input-inline seller-inline-5">
                        <input type="text" name="originalId" required lay-verify="required" th:value="${applet.originalId}" autocomplete="off" placeholder="请输入小程序原始Id" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">
                        请至微信小程序平台 设置》开发设置 中复制粘贴过来
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2"><i class="required-color">*</i>主体信息：</label>
                    <div class="layui-input-inline seller-inline-5">
                        <input type="text" name="information" required lay-verify="required" th:value="${applet.information}" autocomplete="off" placeholder="请输入小程序主体信息" class="layui-input">
                    </div>
                    <input type="hidden" th:value="${applet.id}" name="id">
                    <div class="layui-form-mid layui-word-aux">
                        请至微信小程序平台 设置》基本设置 中复制粘贴过来
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label seller-inline-2">简介：</label>
                    <div class="layui-input-inline seller-inline-5">
                        <textarea placeholder="请输入小程序简介" name="synopsis" class="layui-textarea" >[[${applet.synopsis}]]</textarea>
                    </div>
                </div>
                <br>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input class="layui-btn " type="submit" value="保存"></input>
                        <a href="javascript:history.back(-1);" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="cancleAuthor">返回</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="site-mobile-shade">
    </div>
</div>
<script src="../lib/layui/layui.js" charset="utf-8"></script>
<script src="../js/x-admin.js"></script>
<script src="webjars/jquery/3.3.1/jquery.js"></script>
<script>

    layui.use('form', function(){
        var form = layui.form();
        form.render();
    });

    layui.use('upload', function(){
        var upload = layui.upload;

        //执行实例
        var uploadInst = upload.render({
            elem: '#test1' //绑定元素
            ,url: '/upload/' //上传接口
            ,done: function(res){
                //上传完毕回调
            }
            ,error: function(){
                //请求异常回调
            }
        });
    });

    upload.render({
        elem: '#id'
        ,url: '/api/upload/'
        ,auto: false //选择文件后不自动上传
        ,bindAction: '#testListAction' //指向一个按钮触发上传
        ,choose: function(obj){
            //将每次选择的文件追加到文件队列
            var files = obj.pushFile();

            //预读本地文件，如果是多文件，则会遍历。(不支持ie8/9)
            obj.preview(function(index, file, result){
                console.log(index); //得到文件索引
                console.log(file); //得到文件对象
                console.log(result); //得到文件base64编码，比如图片

                //obj.resetFile(index, file, '123.jpg'); //重命名文件名，layui 2.3.0 开始新增

                //这里还可以做一些 append 文件列表 DOM 的操作

                //obj.upload(index, file); //对上传失败的单个文件重新上传，一般在某个事件中使用
                //delete files[index]; //删除列表中对应的文件，一般在某个事件中使用
            });
        }
    });

    function del(obj) {
        var id=$(obj).attr("id");
        if(confirm("确认要删除吗？")){
            $.post("/promotion/del","id="+id,function () {
                alert("删除成功!")
                $(obj).parent().parent().remove()
            })
        }
    }

    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>


</body>
</html>
